package com.neusoft.neuiotms.dcom.converter.hn;

import org.springframework.stereotype.Component;

import com.neusoft.bizcore.web.dto.AbstractConverter;
import com.neusoft.neuiotms.dcom.dto.hn.HnInspectionHealthTaskAttachmentDTO;
import com.neusoft.neuiotms.dcom.model.hn.HnInspectionHealthTaskAttachment;

@Component
public class HnInspectionHealthTaskAttachmentConverter
        extends AbstractConverter<HnInspectionHealthTaskAttachment, HnInspectionHealthTaskAttachmentDTO> {

    @Override
    public HnInspectionHealthTaskAttachment toModel(final HnInspectionHealthTaskAttachmentDTO dto) {
        final HnInspectionHealthTaskAttachment model = new HnInspectionHealthTaskAttachment();
        model.setFsId(dto.getFsId());
        model.setName(dto.getName());
        return model;
    }

    @Override
    public HnInspectionHealthTaskAttachmentDTO toDTO(final HnInspectionHealthTaskAttachment model,
            final boolean forListView) {
        final HnInspectionHealthTaskAttachmentDTO dto = new HnInspectionHealthTaskAttachmentDTO();
        dto.setFsId(model.getFsId());
        dto.setName(model.getName());
        return dto;
    }

}
